package com.java.rabbitmq.producer.config;

import org.springframework.amqp.core.DirectExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Woo_home
 * @create 2020/5/27 14:09
 */

@Configuration
public class RabbitMQConfig {

    // 声明交换机
    @Bean
    public DirectExchange directExchange() {
        return new DirectExchange("EmailExchange");
    }
}
